<template>
  <div class="service-panel">
    <!-- 关闭按钮 -->
    <span class="close icon-close" @click="$emit('close')">×</span>
    <!-- 标题 -->
    <div class="title">服务说明</div>
    <!-- 内容 -->
    <div class="content">
      <div class="item" v-for="(service, index) in services" :key="index">
        <div class="dt">{{ service.title }}</div>
        <div class="dd">{{ service.description }}</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      services: [
        {
          title: "无忧退货",
          description: "自收到商品之日起30天内，可在线申请无忧退货服务（食品等特殊商品除外）"
        },
        {
          title: "快速退款",
          description: "收到退货包裹并确认无误后，将在48小时内办理退款，退款将原路返回，不同银行处理时间不同，预计1-5个工作日到账"
        },
        {
          title: "满88元免邮费",
          description: "单笔订单金额(不含运费)满88元可免邮费，不满88元，单笔订单收取10元邮费"
        }
      ]
    };
  }
};
</script>

<style scoped>
.service-panel {
  padding: 0 30rpx;
  border-radius: 20rpx 20rpx 0 0;
  position: relative;
  background-color: #fff;
}
.title {
  line-height: 1;
  padding: 40rpx 0;
  text-align: center;
  font-size: 32rpx;
  font-weight: normal;
  border-bottom: 1rpx solid #ddd;
  color: #444;
}
.close {
  position: absolute;
  right: 20rpx;
  top: 20rpx;
  width: 60rpx;
  height: 60rpx;
  line-height: 60rpx;
  text-align: center;
  border-radius: 50%;
  background-color: #f5f5f5;
  font-size: 40rpx;
  color: #999;
}
.content {
  padding: 20rpx 20rpx 60rpx 20rpx;
  max-height: 60vh;
  overflow-y: auto;
}
.item {
  margin-top: 20rpx;
}
.dt {
  margin-bottom: 10rpx;
  font-size: 28rpx;
  color: #333;
  font-weight: 500;
  position: relative;
  padding-left: 30rpx;
}
.dt::before {
  content: '';
  width: 10rpx;
  height: 10rpx;
  border-radius: 50%;
  background-color: #eaeaea;
  position: absolute;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}
.dd {
  line-height: 1.6;
  font-size: 26rpx;
  color: #999;
  padding-left: 30rpx;
}
</style>